using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace ComputaGuru.SpEAd
{
    public partial class LinkStyleSelector : Form
    {
        public LinkStyle SelectedLinkStyle
        {
            get
            {
                return (LinkStyle)Enum.Parse(typeof(LinkStyle), this.selectedStyle.SelectedIndex.ToString());
            }
        }

        public LinkStyleSelector()
        {
            InitializeComponent();
        }

        private void LinkStyleSelector_Load(object sender, EventArgs e)
        {

        }

        private void okButton_Click(object sender, EventArgs e)
        {
            this.DialogResult = DialogResult.OK;
            this.Hide();
        }

        private void cancelButton_Click(object sender, EventArgs e)
        {
            this.DialogResult = DialogResult.Cancel;
            this.Hide();
        }

        private void selectedStyle_SelectedIndexChanged(object sender, EventArgs e)
        {
            this.okButton.Enabled = this.selectedStyle.SelectedIndex != -1;
        }
    }
}